import { CSSProperties, forwardRef } from "react"
import { WordParagraphBlockSlice } from "../../../utils/types";

interface Props {
    style?: CSSProperties
    className?: string,
    wordParagraphBlockSliceList: WordParagraphBlockSlice[]
}

const WordParagraphSliceRender = (props: Props, ref: any) => {
    const {
        style,
        className = '',
        wordParagraphBlockSliceList
    } = props;

    return (
        <div
            style={style ? style : {}}
            className={className}
        >
            {
                wordParagraphBlockSliceList.map((slice, index) => {
                    return (
                        <span>{slice.content}</span>
                    )
                })
            }
        </div>
    )
}


export default forwardRef(WordParagraphSliceRender);